1. Field of the Invention
The present invention relates to a method for moving grouped characters, a recording medium and a game device, and in particular relates to a method for moving grouped characters where a plurality of characters which are displayed on a three-dimensional virtual space and in which a leader is included form a group and the grouped characters are moved towards a predetermined target point, a recording medium on which the method is recorded, and a game device which is called at a predetermined period where a software which is read from a recording medium by operating an inputting section can be loaded to a storing section, and which is provided with a position calculating section for calculating a position of each character of a group of characters which is moved to a predetermined target point, the group being formed with a plurality of characters including a leader.
2. Description of the Related Art
Nowadays, various kinds of game software are recorded on recording media such as CD-ROMs or the like and are being marketed from respective companies in the game industry. Such recording media are used by inserting into game devices. As shown in FIG. 1, the most popular home-use game device 10 among the game devices is structured by connecting an inputting device 3 such as a controller pad shown in FIG. 2 and a television monitor 4 to a main body 2 of the game device. When a player inserts a recording medium 1 into the main body 2 of the game device, a game program which is recorded on the recording medium 1 is loaded to a RAM which is a storing memory of the main body 2 of the game device automatically or by pushing down a predetermined button on the inputting device 3, and a game starts off. Then, the player can enjoy the game by operating various buttons on the inputting device 3.
By the way, games where five or so (a plurality of) characters are moved mainly on 2-dimensionally expressed coordinates while they are forming a rank are marketed as the conventional games. For example, Japanese Patent Application Laid-open (JP-A) No. 8-63613 discloses a technique that gives each fellow character which follows a hero character as a leader of the rank variety of motions matched with the personality of each fellow character by setting in advance an inherent moving speed, and a timing or a probability of changing a direction defined for each fellow character.
According to this technique, when a position on which each fellow character is to be actually displayed is set as a target position, a vector sum of a reference position which is determined according to a locus on which the hero character traces and on which the fellow character is fundamentally traces, and a relative position showing an offset to the fundamental position, is computed to obtain the target position of the fellow character. When there is an obstacle at the target position, the target position is set back to the last value, and the relative position is determined such that the target position takes the last value, so that the fellow character is brought to a short halt. Accordingly, each fellow character following the hero character is moving to the target position where other preceding fellow characters moving ahead of the fellow character do not occupy.
Incidentally, as a technique relevant to the present invention, there is a paper regarding equations of motion according to Euler method, entitled xe2x80x9cDynamic animation: interaction and controlxe2x80x9d (Jane Wilhelms, Matthew Moore, and Robert Skinner) in xe2x80x9c2.2 Numerical integration methodsxe2x80x9d, pp. 283-295, xe2x80x9cThe Visual Computerxe2x80x9d published in April, 1988.
However, the technique disclosed in the above JP-A No. 8-63613, since the predetermined moving speed and the predetermined timing/probability of changing the direction are not changed in accordance with a situation in which the fellow characters are moving, the respective fellow characters are displayed so as to follow the movement of the hero character and they can not move while displaying their delicate reciprocal interactions among them. That is, in a group (troop, flock, flight, herd, pack, swarm, school, etc.) of animals such as actual birds, horses or the like, since birds or horses positioned in the middle to the rear portion of the group are not moving with observing the movement of a leader, but are moving with adjusting their speeds or directions so as to correspond to the movement of the birds or horses moving around them. Therefore, the technique described in the above Laid-open has a problem that a moving state of the group of actual animals can not be expressed with a sense of reality.
In view of the above facts, an object of the present invention is to provide a method for moving grouped characters whose interaction can be expressed realistically, a recording medium thereof, and a game device.
In order to solve the above problem, a first aspect of the present invention is a method for moving grouped characters where a plurality of characters which are displayed on a three-dimensional virtual space and in which a leader is included form a group and the grouped characters are moved towards a predetermined target point, comprising the steps of: calculating a first acceleration for moving a character away from another character when the another character exists within a predetermined first region for the character, and a second acceleration for matching the character with moving speed and direction of another character which is moving so as to follow the leader when the another character exists within a predetermined second region for the character, respectively; and calculating a position of the character on the three-dimensional virtual space on the basis of summed acceleration obtained by summing the calculated first and second accelerations for each of x, y and z components on the three-dimensional virtual space within a predetermined-time.
In the aspect of the present invention, since the character is moved to the target position by the acceleration where the first acceleration for moving the character away from another when the another character exists within the predetermined first region and the second acceleration for matching the character with the moving speed and direction of another character which is moving so as to follow the leader when the another character exists within the predetermined second region are summed for each of x, y and z components on the three-dimensional virtual space, the character moves while changing its speed and direction in accordance with the moving situation of other characters in the first and second regions. Accordingly, action of movement of the character can be displayed with a reality.
In this aspect, in a case in which the first and second regions are spheres or circles defined by predetermined vertical angles or predetermined radii centering the character, and the vertical angle for the first region is made larger than that for the second region and the radius for the former is made smaller than that for the latter, a view (sight) similar to an animal""s view in the natural world can be given to the character, so that action of the movement of each character can be displayed in Imitation of an animal in the natural world.
Further, by calculating a third acceleration for moving the character away from another character when the another character exists within a predetermined third region for the character, and by calculating the position of the character on the three-dimensional virtual space on the basis of summed acceleration obtained by summing the calculated first to third accelerations for each of x, y and z components on the three-dimensional virtual space within the predetermined time, the character moves while changing its speed and direction in accordance with the moving situation of the other characters existing within the first to third regions, the action of movement of each character can be displayed in a more real manner. In this case, when the first to third regions are spheres or circles defined by predetermined vertical angles or predetermined radii centering the character, the vertical angle for the first region is made larger than that for the second region and the vertical angle for the second region is made larger than that for the third region, and the radius for the first region is made smaller than that for the second and the radius for the second region is made smaller than that for the third region, the view similar to the animal""s view in the natural world can be given elaborately to each character, so that the action of the movement of each character can be displayed precisely in imitation of the animal in the natural world. Furthermore, in a case that the first acceleration is changed so as to increase sharply when a distance between the character and another character is small and the third acceleration is changed at a constant rate when the distance between the character and the another character is small, the character tries to move away from the another character with large acceleration when it approaches the another character, and the character tries to avoid another remote character with small acceleration when the another remote character exists, so that the character can be caused to behave like movement (motion) of each animal of a troop or group of animals in the natural world.
Moreover, when the first aspect is structured so as to further include a wandering step where, after the group reached the target point, the character wanders about within a predetermined region at a predetermined velocity on the basis of predetermined information, a state in which animals in the troop in the natural world are crowded together can be displayed. In this time, in a case that the character moves towards a reference point which is arbitrarily set within the predetermined region at a velocity larger than the predetermined velocity until the character returns within the predetermined region when the character moves outside the predetermined region, behavior of the animal in the natural world trying to return to his/her troop when he/she has separated from the troop can be displayed in a real manner. When the first aspect is structured so as to further include an agglutinated state canceling step where, when an agglutinated state in which a character agglutinates another character so that it can not move is generated, an advancing direction of the character is changed so as to cancel the agglutinated state, the character which can not move due to the agglutinated state is prevented from being generated so that a player can be prevented from getting tired of a game, and behavior of the animal in the natural world who can not move backward can be reproduced.
A second aspect of the present invention is a computer-readable recording medium on which the method for moving grouped characters of the first aspect is recorded. And, a third aspect of the present invention is a game device, where a software which is read from a recording medium by operating an inputting section can be loaded to a storing section, and which is provided with a position calculating section, which is called at a predetermined period, for calculating a position of each character of a group of characters which is moved to a predetermined target point, the group being formed with a plurality of characters including a leader, wherein the position calculating section comprises: a first acceleration calculator for calculating a first acceleration for moving the character away from another character when the another character exists within a predetermined first region for the character; a second acceleration calculator for calculating a second acceleration for matching the character with moving speed and direction of another character which is moving so as to follow the leader when the another character exists within a predetermined second region for the character; and a position calculator for calculating a position of the character on a three-dimensional virtual space on the basis of summed acceleration obtained by summing the accelerations calculated by the first and second acceleration calculator for each of x, y and z components on the three-dimensional virtual space.